package d12_stringbuilder;

public class Test {
    public static void main(String[] args) {
        String s = "12312321";
        StringBuilder s1 = new StringBuilder("bruan");
        s1.append(21);
        s1.append(222.33);
        s1.append("连楷洪");
        s1.append("sss");
        s1.append("dwdw");
        System.out.println(s1);

        //支持链式编程
        s1.append("ss").append(21).append(6666);
        System.out.println(s1);

        //反转
        System.out.println(s1.reverse());

        //返回字符串长度
        System.out.println(s1.length());

        //StringBuilder -- 》 String
        String s3 = s1.toString();
        System.out.println(s3);
    }
}
